package com.ssm.service.impl;

import com.ssm.mapper.EmployeeMapper;
import com.ssm.pojo.Employee;
import com.ssm.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;
    public List<Employee> getAll() {
        return employeeMapper.getAll();
    }

    @Override
    public void insertEmployee(Employee employee) {
        employeeMapper.insertEmployee(employee);
    }

    @Override
    public Employee getById(Integer empId) {
        return employeeMapper.getById(empId);
    }

    @Override
    public void deleteById(Integer empId) {
        employeeMapper.deleteById(empId);
    }

    @Override
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }
}
